{{ define "main"}}

{{ $paginator := .Paginate (where site.RegularPages "Type" "posts") }}

{{ if site.Params.zenMode }}
<div class="dream-zen-posts max-w-[65ch] mt-8 mx-auto px-4 space-y-8">
{{ range $paginator.Pages }}
  {{ .Render "zen-summary" }}
{{ end }}
</div>
{{ else }}
<div class="dream-grid">
  {{ range $paginator.Pages }}
  <div class="w-full md:w-1/2 lg:w-1/3 xl:w-1/4 p-4 dream-column">
    {{ .Render "summary" }}
  </div>
  {{ end }}
</div>
{{ end }}

{{ if gt $paginator.TotalPages 1 }}
<div class="flex justify-center mt-8">
  {{ partial "paginator.html" (dict "paginator" $paginator) }}
</div>
{{ end }}

{{ end }}

{{ define "js" }}

{{ if site.Params.Experimental.jsDate }}
{{ partial "luxon.html" . }}
{{ end }}

{{ end }}
